package com.imooc.adapter;

public class NoteBook {

	private ThreePlugI plugI;
	
	public NoteBook(ThreePlugI plugI) {
		super();
		this.plugI = plugI;
	}

	//使用插座充电
	public void charge() {
		plugI.powerWithThree();
	}
	/**
	 * @param args
	 */
	public static void main(String[] args) {
//		GBTwoPlug twoPlug = new GBTwoPlug();
//		ThreePlugI threePlug = new TwoPlugAdapter(twoPlug); 
		ThreePlugI threePlug = new TwoPlugAdapterExtends();
		NoteBook nb = new NoteBook(threePlug);
		nb.charge();

	}

}
